import { App } from 'vue'

import '@/assets/css/index.less'
import 'normalize.css/normalize.css'

import registerElement from '@/global/register-element'
import registerProperties from '@/global/register-properties'

import PageContent from '@/components/page-content'

import PageSearch from '@/components/page-search'

import PageModel from '@/components/page-model'

export default function registerApp(app: App): void {
  //1:注册饿了么组件
  app.use(registerElement)

  //2:注册全局属性
  app.use(registerProperties)

  //3:全局注册自定义组件

  app.component(PageContent.name, PageContent)
  app.component(PageSearch.name, PageSearch)
  app.component(PageModel.name, PageModel)
}
